<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计算器</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #f4f4f4;
        }

        .calculator-container {
            text-align: center;
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        .input-group {
            display: flex;
            justify-content: center;
            margin-bottom: 10px;
        }

        .input-group label {
            margin-right: 10px;
            width: 50px;
            text-align: right;
        }

        .input-group input {
            width: 150px;
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        .add-button {
            padding: 5px 10px;
            border: none;
            background-color: #007bff;
            color: white;
            border-radius: 4px;
            cursor: pointer;
        }

        .add-button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
    <div class="calculator-container">
        <h1>计算器</h1>
        <div class="input-group">
            <label for="number1">数字1:</label>
            <input type="number" id="number1" value="5">
        </div>
        <div class="input-group">
            <label for="number2">数字2:</label>
            <input type="number" id="number2" value="16">
        </div>
        <button class="add-button" onclick="calculateSum()">点击相加</button>
    </div>

    <script>
        function calculateSum() {
            const num1 = parseFloat(document.getElementById('number1').value);
            const num2 = parseFloat(document.getElementById('number2').value);
            const result = num1 + num2;
            alert(`结果是: ${result}`);
        }
    </script>
</body>
</html>
